package bbs.entity.enums;

/**
 * 提示消息状态
 */
public enum MessageStatusEnum {
    UNREAD(0, "未读"),
    READ(1, "已读");

    private Integer status;
    private String desc;

    private MessageStatusEnum(Integer status, String desc) {
        this.status = status;
        this.desc = desc;
    }
    public static MessageStatusEnum getByCode(Integer status) {
        for (MessageStatusEnum item : MessageStatusEnum.values()) {
            if (item.getStatus().equals(status)) {
                return item;
            }
        }
        return null;
    }
    public String getDesc() {
        return desc;
    }
    public Integer getStatus() {
        return status;
    }

}
